package com.wispx.gateway.core.response;

import io.netty.handler.codec.http.DefaultHttpHeaders;
import io.netty.handler.codec.http.HttpHeaders;
import io.netty.handler.codec.http.HttpResponseStatus;
import lombok.Data;
import org.asynchttpclient.Response;

/**
 * 网关响应
 */
@Data
public class GatewayResponse {

    /**
     * 响应头
     */
    private HttpHeaders responseHeaders = new DefaultHttpHeaders();

    /**
     * 响应内容
     */
    private String content;

    /**
     * 响应状态
     */
    private HttpResponseStatus responseStatus;

    /**
     * 响应结果
     */
    private Response response;

    public void addHeader(CharSequence key, CharSequence val) {
        responseHeaders.add(key, val);
    }

}
